package com.mmp.main.servlet.report.filter;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mmp.common.servlet.BasicServlet;
import com.mmp.main.util.Default;
import com.mmp.main.util.Enums;

public class JobOrderFilterDisplayServlet extends BasicServlet {

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
			IOException {

		String dest = request.getParameter(Default.SEARCH_DEST_PARAM_NAME);

		if (dest.equals("" + Enums.JOB_ORDER_STATUS.CLOSED.getStatus()))
			dest = "ViewJobOrdersClosed";
		else if (dest.equals("" + Enums.JOB_ORDER_STATUS.CANCELLED.getStatus()))
			dest = "ViewJobOrdersCancelled";

		request.setAttribute("formAction", dest);

		forwardToReportFilterScreen(request, response, "report/filter/JobOrderFilter.jsp");
	}

}
